package com.example.zhu29.bledemo.util;

import java.math.BigDecimal;

/**
   * Created by Zhu Dewei on 2017/12/13.
   * Commonly used string tool classes
   */

public class StringUtil {
    public static String formatTo1(double f) {
        BigDecimal bg = new BigDecimal(f);
        return bg.setScale(1, BigDecimal.ROUND_HALF_UP).toString();
    }
}
